﻿@model WebChatClient.Controllers.Chatter

@{
    ViewBag.Title = "Register";
}

<h2>Create a New Account</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("Index", "Register", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.")

        <div>
        <fieldset>
            <legend>Account Information</legend>

            <div class="editor-label">
                @Html.LabelFor(m => m.Nick)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Nick)
                @Html.ValidationMessageFor(m => m.Nick)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>


            
             <div class="editor-label">
                @Html.LabelFor(m => m.Avatar)
            </div>
            <div class="editor-field">
                <input type="file" name="imageFile"  />
            </div>


            <p>
                <input type="submit" value="Register" />
            </p>
        </fieldset>
    </div>
}

















